package com.atguigu.gulimall.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 引入RabbitMQ
 * 1、引入amqp场景: RabbitAutoConfiguration
 * 2、给容器中自动配置了
 *      AmqpAdmin、RabbitTemplate、CachingConnectionFactory、RabbitMessagingTemplate
 *      所有的属性都是
 *      @ConfigurationProperties(prefix = "spring.rabbitmq")
 *      public class RabbitProperties
 *
 * 3、给配置文件中配置 spring.rabbitmq 信息
 *
 * 4、@EnableRabbit:@Enable Xxxxxx
 *
 * 5、监听消息: 使用@RabbitLister 必须有@EnableRabbit
 * @RabbitLister:类 + 方法上(监听哪些队列)
 * @RabbitHandler：标记在方法上(重载区分不同的消息)
 */
@MapperScan("com.atguigu.gulimall.order.dao")
@EnableRabbit
@SpringBootApplication
public class GulimallOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallOrderApplication.class, args);
    }

}
